#include "Engine/Backbone.h"
#include "GameState/Master/Master.h"
#include "GameState/Tutorial/Tutorial.h"
#include "GameState/Endgame/Endgame.h"
#include "GameState/Main/Main.h"
#include "Gameplay/Play.h"
#include "GameState/Options/Options.h"
#include "GameState/DataStorage.h"

#include "SDL.h"

int main(int argc, char * argv[]) {
	atexit(SDL_Quit);
	try {
		Engine::Backbone::raise();
	} catch (char * err) {
		printf("error: %s\n", err);
		exit(1);
	};
	//Gameplay::Play newPlay("Alien_Blood_by_xactive");
	GameState::DataStorage<std::string>::set("defaultLevel", "Alien_Blood_by_xactive");
	GameState::DataStorage<bool>::set("hardModeSetted", false);
	
	GameState::Master::Master::raise();
	GameState::Tutorial::Tutorial::raise();
	GameState::Endgame::Endgame::raise();
	GameState::Main::Main::raise();
	GameState::Options::Options::raise();
	Engine::Backbone::changeContext("masterGameState");
	Engine::Backbone::awake();
	return 0;
}
